﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace SanJ.FreeCare.Migrations
{
    /// <inheritdoc />
    public partial class Updated_Medication_24041813481608 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "MarketingHolderId",
                table: "AppMedications");

            migrationBuilder.RenameColumn(
                name: "doseFormCode",
                table: "AppMedications",
                newName: "DoseFormCode");

            migrationBuilder.RenameColumn(
                name: "totalVolumeUnitCode",
                table: "AppMedications",
                newName: "TypeCode");

            migrationBuilder.RenameColumn(
                name: "totalVolume",
                table: "AppMedications",
                newName: "AntiOnceMinValue");

            migrationBuilder.AddColumn<string>(
                name: "Alias",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "AliasEN",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "AliasPY",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "AliasWB",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "AnitDDDUnitCode",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<decimal>(
                name: "AnitDDDValue",
                table: "AppMedications",
                type: "decimal(65,30)",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<string>(
                name: "AntiClassCode1",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "AntiClassCode2",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<int>(
                name: "AntiFrequencyMax",
                table: "AppMedications",
                type: "int",
                nullable: true);

            migrationBuilder.AddColumn<int>(
                name: "AntiFrequencyMin",
                table: "AppMedications",
                type: "int",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "AntiLevelCode",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<decimal>(
                name: "AntiOnceMaxValue",
                table: "AppMedications",
                type: "decimal(65,30)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "AntiOnceUnitCode",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "BaseUnitCode",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "ClassCode",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "ClinicSaleUnitCode",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<decimal>(
                name: "ClinicSaleVolume",
                table: "AppMedications",
                type: "decimal(65,30)",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<string>(
                name: "DefaultDoseUnitCode",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<decimal>(
                name: "DefaultDoseVolume",
                table: "AppMedications",
                type: "decimal(65,30)",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<string>(
                name: "DefaultFrequencyCode",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "DefaultUsageCode",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<decimal>(
                name: "DefultDoseVolume",
                table: "AppMedications",
                type: "decimal(65,30)",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<string>(
                name: "FeeTypeCode",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "GBCode",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "InpatientSaleUnitCode",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "InpatientSaleVolume",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "KeyWord",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "LevelCode",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "ProductName",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "ProductNameEN",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "ProductNamePY",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "ProductNameWB",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<decimal>(
                name: "RetailPrice",
                table: "AppMedications",
                type: "decimal(65,30)",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<string>(
                name: "ScientificName",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "ScientificNameEN",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "ScientificNamePY",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "ScientificNameWB",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "SecondDoseUnitCode",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<decimal>(
                name: "SecondDoseVolume",
                table: "AppMedications",
                type: "decimal(65,30)",
                nullable: false,
                defaultValue: 0m);

            migrationBuilder.AddColumn<string>(
                name: "SkinTestCode",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "SkinTestFlag",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "SkinTestNeedFlag",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "SkinTestTypeFlag",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "SpecialTypeCode",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "Specification",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "TransportUnitCode",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "TransportVolume",
                table: "AppMedications",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "Alias",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "AliasEN",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "AliasPY",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "AliasWB",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "AnitDDDUnitCode",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "AnitDDDValue",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "AntiClassCode1",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "AntiClassCode2",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "AntiFrequencyMax",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "AntiFrequencyMin",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "AntiLevelCode",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "AntiOnceMaxValue",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "AntiOnceUnitCode",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "BaseUnitCode",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "ClassCode",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "ClinicSaleUnitCode",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "ClinicSaleVolume",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "DefaultDoseUnitCode",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "DefaultDoseVolume",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "DefaultFrequencyCode",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "DefaultUsageCode",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "DefultDoseVolume",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "FeeTypeCode",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "GBCode",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "InpatientSaleUnitCode",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "InpatientSaleVolume",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "KeyWord",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "LevelCode",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "ProductName",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "ProductNameEN",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "ProductNamePY",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "ProductNameWB",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "RetailPrice",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "ScientificName",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "ScientificNameEN",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "ScientificNamePY",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "ScientificNameWB",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "SecondDoseUnitCode",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "SecondDoseVolume",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "SkinTestCode",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "SkinTestFlag",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "SkinTestNeedFlag",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "SkinTestTypeFlag",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "SpecialTypeCode",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "Specification",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "TransportUnitCode",
                table: "AppMedications");

            migrationBuilder.DropColumn(
                name: "TransportVolume",
                table: "AppMedications");

            migrationBuilder.RenameColumn(
                name: "DoseFormCode",
                table: "AppMedications",
                newName: "doseFormCode");

            migrationBuilder.RenameColumn(
                name: "TypeCode",
                table: "AppMedications",
                newName: "totalVolumeUnitCode");

            migrationBuilder.RenameColumn(
                name: "AntiOnceMinValue",
                table: "AppMedications",
                newName: "totalVolume");

            migrationBuilder.AddColumn<Guid>(
                name: "MarketingHolderId",
                table: "AppMedications",
                type: "char(36)",
                nullable: true,
                collation: "ascii_general_ci");
        }
    }
}
